package com.yang.dao;

import com.yang.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper {
    int deleteByPrimaryKey(Integer uid);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer uid);
    /**
     * 登录 根据用户名密码查询
     * @param username
     * @param password
     * @return
     */
    User selectByPasswordAndName(@Param("username") String username, @Param("password") String password);

    /**
     * 校验用户名是否存在 根据用户名查询
     * @param username
     * @return
     */
    User selectByUsername(@Param("username") String username);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
}